/*
 *  This file is part of "SchoolChoice",
 *  a school registration system.
 *
 *  Copyright (C) 2009 Nicolas Decerf, Olivier Jacquemin.
 *
 *  "SchoolChoice" is free software; you can redistribute it and/or modify
 *  it under the terms of the GNU General Public License as published by
 *  the Free Software Foundation; either version 3 of the License, or
 *  (at your option) any later version.
 *
 *  "SchoolChoice" is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU General Public License for more details.
 *
 *  You should have received a copy of the GNU General Public License
 *  along with this program: see the file COPYING.txt.  If not, see
 *  http://www.gnu.org/licenses/.
 */

package be.schoolchoice.webapp.web;

import java.util.*;

import be.schoolchoice.webapp.data.UserSchoolAssignment;
import be.schoolchoice.webapp.data.UserSchoolChoice;

/**
 * Web service providing operations for assigning schools to users.
 */
public class AssignmentService {
    /**
     * @return All ordered schools preferences specified by users.
     */
    public static UserSchoolChoice[] getAllUserSchoolChoices() {
    	// TODO: implement correctly.
    	List<UserSchoolChoice> result = new ArrayList<UserSchoolChoice>();
    	result.add(new UserSchoolChoice("NatNum1", "School1", 1));
    	result.add(new UserSchoolChoice("NatNum1", "School2", 2));
    	result.add(new UserSchoolChoice("NatNum2", "School2", 1));
    	result.add(new UserSchoolChoice("NatNum2", "School3", 2));
		return result.toArray(new UserSchoolChoice[0]);
    }

    /**
     * Sets a single school to each user.
     * @param assignments List of (user, school) couples.
     */
    public static void assignSchoolsToUsers(UserSchoolAssignment[] assignments) {
    }

}
